<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Func(names){
            this.name = names;
            this.sayHello = function(){
                console.log('你好',this.name)
            }
        }

        const p1 = new Func('杨璐');
        // 创建对象  内部创键了一个函数 赋值给了sayHello 
        const p2 = new Func('杨关瑞');

        alert(p1.sayHello === p2.sayHello);
    </script>
</body>
</html>